using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Comteck.Winforms.Validations {

  /// <summary>
  /// 
  /// </summary>
  public class MvcValidationRule {
    /// <summary>
    /// 字段
    /// </summary>
    public string Field { get; set; }

    /// <summary>
    /// 字段类型
    /// </summary>
    public Type FieldType { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    public string DisplayName { get; set; }

    /// <summary>
    /// 提示信息
    /// </summary>
    public string ErrorMessage { get; set; }

    /// <summary>
    /// 最大长度
    /// </summary>
    public int MaxLength { get; set; }

    /// <summary>
    /// 最小长度
    /// </summary>
    public int MinLength { get; set; }
    /// <summary>
    /// 最小值
    /// </summary>
    public double MinValue { get; set; }
    /// <summary>
    /// 最大值
    /// </summary>
    public double MaxValue { get; set; }

    /// <summary>
    /// 验证类型
    /// </summary>
    public MvcValidationType ValidationType { get; set; }

    /// <summary>
    /// 顺序
    /// </summary>
    public int Order { get; set; }

    /// <summary>
    /// 获取要与当前属性进行比较的属性
    /// </summary>
    public string OtherProperty { get; set; }

    /// <summary>
    /// 获取另一个属性的显示名称
    /// </summary>
    public string OtherPropertyDisplayName { get; set; }
  }

}
